package com.hl.web;

import com.hl.pojo.Users;
import com.hl.service.DengluService;
import com.hl.util.GeneralResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin()
@RestController

//@RestController等价于@ResponseBody+@Controller
public class DengluController {
    @Autowired
    private DengluService dengluService;

    @RequestMapping("/denglu")
    public GeneralResult denglu(@RequestBody Users users){
        GeneralResult result = dengluService.denglu(users);
        System.out.println(result);
        return result;
    }
}
